#include <iostream>


class A
{
public:
    //委托构造:委托已有的构造函数帮助进行赋值
    A():a(0),b(0),c(0){}
    A(int a):A()
    {
        this->a = a;
    }
    A(int a,int b):A(a)
    {
        this->b = b;
    }
    A(int a,int b,int c):A(a,b)
    {
        this->c = c;
    }
private:
    int a;
    int b;
    int c;
};

class B : public A // 继承构造:继承父类的构造函数
{
public:
    using A::A;
};

int main()
{
    B b;
    B b1(1);
    B b2(1,2);
    B b3(1,2,3);
    return 0;
}